﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hfm.Common.Entity.Warehouse;
using Hfm.Core.DataAccess.Warehouse;
using Hfm.Core.BusinessManager.Country;

namespace Hfm.Core.BusinessManager.Warehouse
{
    public class WareHouseManager
    {
        protected readonly WarehouseData WarehouseData;

        public WareHouseManager()
        {

        }

        public WareHouseManager(WarehouseData warehousedata)
        {
            WarehouseData = warehousedata;
        }

        public virtual List<NewWarehouseEntity> GetAllWarehouse(string Name, int? skip = null, int? take = null)
        {
            return WarehouseData.GetAllWarehouse(Name,skip,take);
        }

        public virtual int SelectIsExites(string Name, int Id)
        {
            return WarehouseData.SelectIsExites(Name,Id);
        }

        public virtual int GetWarehouseCountByName(string Name)
        {
            return WarehouseData.GetWarehouseCountByName(Name);
        }

        public virtual WarehousEntity GetWarehouseById(int Id)
        {
            return WarehouseData.GetWarehouseById(Id);
        }

        public virtual void AddWarehouse(WarehousEntity warehousentity)
        {
            WarehouseData.AddWarehouse(warehousentity);
        }

        public virtual void UpdateWarehouse(WarehousEntity warehousentity)
        {
            WarehouseData.UpdateWarehouse(warehousentity);
        }

        public virtual void DeleteWarehouse(int Id)
        {
            WarehouseData.DeleteWarehouse(Id);
        }
    }
}
